package com.example.demo.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.demo.entity.User;
import com.example.demo.mapper.UserMapper;

@Service
public class UserIndexService {
	
@Autowired
 UserMapper userMapper;

public boolean Index(String username,String password) {
	
	User password1=userMapper.Index(username,password);
	if(password1 == null) {
		return false;
	}else {
		if(password.equals(password1.getpassword().toString()))
			return true;
		else
			return false;
	}
	
}

}
